﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, maximum-scale=1, initial-scale=1, user-scalable=0">

    <!-- Always force latest IE rendering engine or request Chrome Frame -->
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,800">

    <!-- Use title if it's in the page YAML frontmatter -->
    <title>ARMS - @ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Core/stylesheets/application.css")" media="screen" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2013.2.918/kendo.common.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2013.2.918/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2013.2.918/kendo.default.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2013.2.918/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Content/Core/javascripts/application.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/kendo/2013.2.918/kendo.all.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2013.2.918/kendo.web.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2013.2.918/kendo.aspnetmvc.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo.modernizr.custom.js")"></script>
    @RenderSection("head", false)
    <script type="text/javascript">

        function QuickReport(averageDailyIncome, dailyOrderCount, dailyIncome) {
            this.averageDailyIncome = averageDailyIncome;
            this.dailyOrderCount = dailyOrderCount;
            this.dailyIncome = dailyIncome;
        }

        var quickReport = new QuickReport();

        $(document).ready(function () {
            
            $.getJSON("@Url.Action("GetQuickReport", "QuickReport", new { area = "Reports" })", function (data) {
                quickReport = data.AverageDailyIncome;
                quickReport = data.DailyIncome;
                quickReport = data.DailyOrderCount;

                $(".quickreport-income").append("$" + data.DailyIncome);
                $(".quickreport-average-income").append("$" + data.AverageDailyIncome);
                $(".quickreport-order-count").append(data.DailyOrderCount);
            });
        });
    </script>
</head>
<body>
    <nav class="navbar navbar-default navbar-inverse navbar-static-top" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <a class="navbar-brand" href="#">ARMS - Advanced Restaurant Management System</a>

            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-primary">
                <span class="sr-only">Toggle Side Navigation</span>
                <i class="icon-th-list"></i>
            </button>

            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-top">
                <span class="sr-only">Toggle Top Navigation</span>
                <i class="icon-align-justify"></i>
            </button>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse navbar-collapse-top">
            <div class="navbar-right">

                @*<ul class="nav navbar-nav navbar-left">
                    <li class="cdrop active"><a href="#">New Order</a></li>

                    <li class="cdrop"><a href="#">Link</a></li>

                    <li class="dropdown cdrop">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="#">Action</a></li>
                            <li><a href="#">Another action</a></li>
                            <li class="divider"></li>
                            <li><a href="#">Separated link</a></li>
                        </ul>
                    </li>
                </ul>*@

                    <form class="navbar-form navbar-left" role="search" id="orderSearch" method="post" action="@Url.Action("View", "Order", new { area = "Orders"})">
                        <div class="form-group">
                            <input type="text" name="orderNumber" class="search-query animated" placeholder="Order#..." />
                            <button type="submit"><i class="icon-search"></i></button>
                        </div>
                    </form>

                <ul class="nav navbar-nav navbar-left">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle dropdown-avatar" data-toggle="dropdown">
                            <span>
                                <img class="menu-avatar" src="../../images/avatars/avatar1.jpg" />
                                <span>@UserData.FirstName @UserData.LastName<i class="icon-caret-down"></i></span>
                                <span class="badge badge-dark-red">5</span>
                            </span>
                        </a>
                        <ul class="dropdown-menu">

                            <!-- the first element is the one with the big avatar, add a with-image class to it -->
                            <li class="with-image">
                                <div class="avatar">
                                    <img src="../../images/avatars/avatar1.jpg" />
                                </div>
                                <span>@UserData.FirstName @UserData.LastName</span>
                            </li>
                            <li class="divider"></li>
                            <li><a href="@Url.Action("Profile", "User", new { area = "People", username = UserData.UserName })"><i class="icon-user"></i><span>Profile</span></a></li>
                            <li><a href="#"><i class="icon-cog"></i><span>Settings</span></a></li>
                            <li><a href="#"><i class="icon-envelope"></i><span>Messages</span> <span class="label label-dark-red pull-right">5</span></a></li>
                            <li><a href="@Url.Action("Logout", "Authentication", new { area = "People" })"><i class="icon-off"></i><span>Logout</span></a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
        <!-- /.navbar-collapse -->
    </nav>

    <div class="sidebar-background">
        <div class="primary-sidebar-background"></div>
    </div>

    <div class="primary-sidebar">

        <!-- Main nav -->
        <ul class="nav navbar-collapse collapse navbar-collapse-primary">
            <li class="">
                <span class="glow active"></span>
                <a href="@Url.Action("Index", "Dashboard", new { area = "" })">
                    <i class="icon-dashboard icon-2x"></i>
                    <span>Dashboard</span>
                </a>
            </li>
            
            <li class="dark-nav ">
                <span class="glow"></span>
                <a class="accordion-toggle collapsed " data-toggle="collapse" href="#diningRoomSubMenu">
                    <i class="icon-food icon-2x"></i>
                    <span>Dining Room
                      <i class="icon-caret-down"></i>
                    </span>
                </a>
                <ul id="diningRoomSubMenu" class="collapse ">
                    <li class="">
                        <a href="@Url.Action("Current", "DiningRoom", new { area = "" })">
                            <i class="icon-bullhorn"></i>Current Status
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Layout", "DiningRoom", new { id = UserData.AppData.CurrentDiningRoomLayoutID })">
                            <i class="icon-globe"></i>Floor Layout
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("History", "DiningRoom", new { area = "" })">
                            <i class="icon-book"></i>History
                        </a>
                    </li>
                </ul>
            </li>

            <li class="dark-nav ">
                <span class="glow"></span>
                <a class="accordion-toggle collapsed " data-toggle="collapse" href="#X5vgQZdN9j">
                    <i class="icon-hdd icon-2x"></i>
                    <span>Products
                      <i class="icon-caret-down"></i>
                    </span>
                </a>
                <ul id="X5vgQZdN9j" class="collapse ">
                    <li class="">
                        <a href="@Url.Action("Index", "Menus", new { area = "Products" })">
                            <i class="icon-book"></i>Menus
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Index", "Product", new { area = "Products" })">
                            <i class="icon-book"></i>Products
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Index", "Ingredients", new { area = "Products" })">
                            <i class="icon-book"></i>Ingredients
                        </a>
                    </li>
                </ul>
            </li>
            <li class="dark-nav ">
                <span class="glow"></span>
                <a class="accordion-toggle collapsed " data-toggle="collapse" href="#ordersSubMenu">
                    <i class="icon-credit-card icon-2x"></i>
                    <span>Orders
                      <i class="icon-caret-down"></i>
                    </span>
                </a>
                <ul id="ordersSubMenu" class="collapse ">
                    <li class="">
                        <a href="@Url.Action("DiningRoom", "Order", new { area = "Orders", tableID = 0 })">
                            <i class="icon-certificate"></i>New Dining Room Order
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Delivery", "Order", new { area = "Orders" })">
                            <i class="icon-plane"></i>New Delivery Order
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Pickup", "Order", new { area = "Orders" })">
                            <i class="icon-truck"></i>New Pick Order
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Pending", "Order", new { area = "Orders" })">
                            <i class="icon-time"></i>Pending
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("History", "Order", new { area = "Orders" })">
                            <i class="icon-book"></i>History
                        </a>
                    </li>
                </ul>
            </li>

            <li class="dark-nav">
                <span class="glow"></span>
                <a class="accordion-toggle" data-toggle="collapse" href="#GJX2pPbd3x">
                    <i class="icon-user-md icon-2x"></i>
                    <span>People
                      <i class="icon-caret-down"></i>
                    </span>
                </a>
                <ul id="GJX2pPbd3x" class="collapse">
                    <li class="">
                        <a href="@Url.Action("Index", "Users", new { area = "People" })">
                            <i class=" icon-book"></i>Users
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Index", "Roles", new { area = "People" })">
                            <i class="icon-book"></i>Roles
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Index", "Customers", new { area = "People" })">
                            <i class="icon-book"></i>Customers
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Index", "Employees", new { area = "People" })">
                            <i class="icon-book"></i>Employees
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Index", "Contacts", new { area = "People" })">
                            <i class="icon-book"></i>Contacts
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Index", "Suppliers", new { area = "People" })">
                            <i class="icon-book"></i>Suppliers
                        </a>
                    </li>
                </ul>
            </li>

            <li class="dark-nav ">
                <span class="glow"></span>
                <a class="accordion-toggle collapsed " data-toggle="collapse" href="#accountingSubMenu">
                    <i class="icon-money icon-2x"></i>
                    <span>Accounting
                      <i class="icon-caret-down"></i>
                    </span>
                </a>
                <ul id="accountingSubMenu" class="collapse ">
                    <li class="">
                        <a href="@Url.Action("Index", "Invoice", new { area = "Accounting" })">
                            <i class="icon-magic"></i>Invoice
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Index", "Payroll", new { area = "Accounting" })">
                            <i class="icon-user"></i>Payroll
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Index", "BudgetManager", new { area = "Accounting" })">
                            <i class="icon-user"></i>Budget
                        </a>
                    </li>
                    <li class="">
                        <a href="@Url.Action("Index", "Daily", new { area = "Accounting" })">
                            <i class="icon-user"></i>Daily Summary
                        </a>
                    </li>
                </ul>
            </li>
            
            <li class="">
                <span class="glow active"></span>
                <a href="@Url.Action("Index", "Dashboard", new { area = "" })">
                    <i class=" icon-cogs icon-2x"></i>
                    <span>System Settings</span>
                </a>
            </li>
        </ul>
        <div class="hidden-sm hidden-xs">
            <hr class="divider" style="margin-top: 60px">
            <div class="sparkline-box side">
                <div class="sparkline-row">
                    <h4 class="gray quickreport-order-count"><span>Orders</span></h4>
                    @*<div class="sparkline big" data-color="gray">
                        <!--23,20,4,21,19,17,8,16,8,18,12,19-->
                    </div>*@
                </div>
                <hr class="divider">
                <div class="sparkline-row">
                    <h4 class="dark-green quickreport-average-income"><span>Income</span></h4>
                    @*<div class="sparkline big" data-color="darkGreen">
                        <!--5,9,19,11,4,11,17,21,26,14,25,28-->
                    </div>*@
                </div>
                <hr class="divider">
                <div class="sparkline-row">
                    <h4 class="blue quickreport-income"><span>Quota</span></h4>
                    @*<div class="sparkline big" data-color="blue">
                        <!--8,25,13,23,21,19,19,19,17,11,16,18-->
                    </div>*@
                </div>
                <hr class="divider">
            </div>
        </div>
    </div>

    <div class="main-content">
        <div class="container">
            <div class="row">

                <div class="area-top clearfix">
                    <div class="pull-left header">
                        <h3 class="title">
                            <i class="icon-beaker"></i>
                            @ViewBag.Title
                        </h3>
                        <h5>
                            <span>@ViewBag.SubTitle</span>
                        </h5>
                    </div>

                    <ul class="list-inline pull-right sparkline-box">

                        <li class="sparkline-row">
                            <h4 class="blue quickreport-order-count"><span>Orders</span></h4>
                            @*<div class="sparkline big" data-color="blue">
                                <!--19,12,16,28,7,16,24,26,26,26,28,21-->
                            </div>*@
                        </li>

                        <li class="sparkline-row">
                            <h4 class="green quickreport-average-income"><span>Income</span></h4>
                            @*<div class="sparkline big" data-color="green">
                                <!--11,15,20,4,20,15,6,18,15,5,19,3-->
                            </div>*@
                        </li>

                        <li class="sparkline-row">
                            <h4 class="red quickreport-income"><span>Quota</span></h4>
                            @*<div class="sparkline big">
                                <!--3,14,5,9,11,26,17,19,21,18,3,24-->
                            </div>*@
                        </li>

                    </ul>
                </div>
            </div>
        </div>

        <div class="container padded">
            <div class="row">
                <!-- Breadcrumb line -->
                <div id="breadcrumbs">
                    @RenderSection("breadcrumb", false)
                </div>
            </div>
        </div>
        <div class="container">@RenderBody()</div>
    </div>
</body>
</html>
